<!doctype html>
<html lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>会员列表</title>
	<script type="text/javascript" src="__PUBLIC__/hdjs/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/hdjs/hdjs.css"/>
    <script type="text/javascript" src="__PUBLIC__/hdjs/hdjs.min.js"></script>
	<link href="__PUBLIC__/css/mine.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<div class="div_head">
		<span>
			<span style="float: left;">当前位置是：角色管理 >></span><span>角色列表</span>
			<span style="float: right; margin-right: 8px; font-weight: bold;">
				<a style="text-decoration: none;" href="__CONTROLLER__/add">【添加角色】</a>
			</span>
		</span>
	</div>
	<div style="font-size: 13px; margin: 10px 5px;padding:20px;">
		<table class="hd-table hd-table-list">
			<thead>
			<tr style="font-weight: bold;">
				<td>序号</td>
				<td>角色名称</td>
				<td>排序</td>
				<td>分配权限</td>
				<td>操作</td>
            </tr>
			<thead>
			<tbody>
				<volist name='list' id='vo'>
				<tr id="product1">
					<td>{$vo.role_id}</td>
					<td>{$vo.role_name}</td>
					<td>
					<input type="text" name="list_order" value="{$vo.role_sort}" id= "{$vo.role_id}" class="hd-w30">
					</td>
					<td><a href="{:U('distribute',array('role_id'=>$vo['role_id']))}">权限分配</a></td>
					<td><a href="{:U('update',array('role_id' => $vo['role_id']))}">修改</a>|
					<a onclick="if (confirm('确定要删除吗？')) return true; else return false;" href="{:U('delete',array('role_id' => $vo['role_id']))}">删除</a></td>
				</tr>
				</volist>

			</tbody>
		</table>
	</div>
	<script type="text/javascript">
	$(document).ready(function(){
	  $("input").blur(function(){
	  	var sortnum = $(this).val();
	  	var this_id = $(this).attr("id");
	   	hd_ajax("{:U('updateSort')}", {sort:sortnum,role_id:this_id}, "__SELF__");
	  });
	});
	</script>

</body>
</html>